<template>
  <div
    v-if="total > totalSoft"
    :class="type === 'fixed' ? 'footer' : 'footer-ordinary'"
  >
    <slot></slot>
  </div>
</template>

<script>
export default {
  props: {
    type: {
      type: String,
      default: "fixed"
    },
    total: {
      type: Number,
      default: 100
    },
    totalSoft: {
      type: Number,
      default: 10
    }
  }
};
</script>

<style lang="scss" scoped>
.footer {
  width: calc(100% - 306px);
  height: 70px;
  border-top: 1px solid #ebedf0;
  border-radius: 0 0 4px 4px;
  overflow: hidden;
  background-color: #fff;
  position: fixed;
  bottom: 6px;
  right: 16px;
  text-align: center;
  padding-top: 20px;
  box-sizing: border-box;
  z-index: 200;
}
.footer-ordinary {
  width: 100%;
  text-align: center;
  padding: 8px 0;
  background: #fff;
}
</style>
